package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import bean.JTextFieldValidator;
import bean.JTextFieldValidatorBeanInfo;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class arbitroV extends javax.swing.JFrame {
	private JPanel jPanelarbitro;
	private JTextField txtcedva;
	private JLabel lblfech;
	private JLabel jLabelvista;
	private JButton btncancelarva;
	private JButton btnregva;
	private JTextField txtfechva;
	private JLabel lblced;
	private JTextField txtapeva;
	private JLabel jLabelape;
	private JTextField txtnomva;
	private JLabel jLabelnom;

	/**
	* Auto-generated main method to display this JFrame
	*/
	
	
	public arbitroV() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setTitle("Registrar Arbitro");
			this.setDefaultLookAndFeelDecorated(true);
			this.setFont(new java.awt.Font("Purisa",0,14));
			this.setIconImage(new ImageIcon(getClass().getClassLoader().getResource("imagen/baseball_32(3).png")).getImage());
			{
				jPanelarbitro = new JPanel();
				getContentPane().add(jPanelarbitro, BorderLayout.CENTER);
				jPanelarbitro.setLayout(null);
				jPanelarbitro.setBackground(new java.awt.Color(255,255,255));
				{
					txtnomva = new JTextFieldValidator(15, JTextFieldValidator.SOLO_LETRAS);
					jPanelarbitro.add(txtnomva);
					txtnomva.setBounds(182, 113, 130, 25);
				}
				{
					jLabelape = new JLabel();
					jPanelarbitro.add(jLabelape);
					jLabelape.setText("Apellido:");
					jLabelape.setBounds(103, 164, 67, 20);
				}
				{
					jLabelnom = new JLabel();
					jPanelarbitro.add(jLabelnom);
					jLabelnom.setText("Nombre:");
					jLabelnom.setBounds(103, 110, 67, 30);
				}
				{
					txtapeva = new JTextFieldValidator(25, JTextFieldValidator.SOLO_LETRAS);
					jPanelarbitro.add(txtapeva);
					txtapeva.setBounds(179, 161, 130, 27);
				}
				{
					lblced = new JLabel();
					jPanelarbitro.add(lblced);
					lblced.setText("Cedula:");
					lblced.setBounds(103, 71, 65, 18);
				}
				{
					txtcedva = new JTextFieldValidator(8, JTextFieldValidator.SOLO_NUMEROS);
					jPanelarbitro.add(txtcedva);
					txtcedva.setBounds(181, 68, 130, 26);
				}
				{
					lblfech = new JLabel();
					jPanelarbitro.add(lblfech);
					lblfech.setText("Fecha de Nacimiento: ");
					lblfech.setBounds(18, 218, 149, 25);
				}
				{
					txtfechva = new JTextFieldValidator(10,JTextFieldValidator.NUMERO_Y_SLASH);
					jPanelarbitro.add(txtfechva);
					txtfechva.setBounds(179, 217, 130, 28);
				}
				{
					btnregva = new JButton();
					jPanelarbitro.add(btnregva);
					btnregva.setText("Registrar");
					btnregva.setBounds(121, 273, 163, 39);
					btnregva.setBackground(new java.awt.Color(0,0,64));
					btnregva.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagen/agt_action_success-32.png")));
					btnregva.setForeground(new java.awt.Color(255,255,255));
				}
				{
					btncancelarva = new JButton();
					jPanelarbitro.add(btncancelarva);
					btncancelarva.setText("Cancelar");
					btncancelarva.setBounds(309, 273, 169, 39);
					btncancelarva.setBackground(new java.awt.Color(0,0,64));
					btncancelarva.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagen/button_cancel-32.png")));
					btncancelarva.setForeground(new java.awt.Color(255,255,255));
				}
				{
					jLabelvista = new JLabel();
					jPanelarbitro.add(jLabelvista);
					jLabelvista.setText("Registrar Arbitro");
					jLabelvista.setBounds(91, 12, 282, 32);
					jLabelvista.setFont(new java.awt.Font("Agency FB",1,28));
				}
			}
			pack();
			this.setSize(509, 385);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public void mensaje(String sms){
		JOptionPane.showMessageDialog(this,sms);
	}
	public void Limpiar() {
		txtnomva.setText("");
		txtcedva.setText("");
		txtapeva.setText("");
		txtfechva.setText("");
		}
	
	
	public String getCedula() {
		return txtcedva.getText();
	}

	
	public String getFechan() {
		return txtfechva.getText();
	}

	
	public String getApellido() {
		return txtapeva.getText();
	}

	
	public String getNombre() {
		return txtnomva.getText();
	}

	
	public void addListener(ActionListener actionListener){
		btnregva.addActionListener(actionListener);
		btncancelarva.addActionListener(actionListener);
	}

}
